<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>JavaScript变量生命周期</title>
</head>

<body>
    <p>JavaScript 变量生命周期在它声明时初始化。</p>
    <p>局部变量在函数执行完毕后销毁。</p>
    <p>全局变量在页面关闭后销毁。</p>
</body>

</html>